package 图书系统.user.book;

public class Book {
    /*
    书的属性
     */
    private String name;
    private String author;
    private double price;
    private String type;
    private boolean borrow;

    //后续会实现一些功能需要以下这些方法
    /*
    对一本书进行初始化，构造方法
     */
//默认没借出去 false 不用初始化
    public Book(String name, String author, double price, String type) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
    }

    /*
        打印书籍
         */
    @Override
    public String toString() {
        return "Book{" +
                "书名='" + name + '\'' +
                ", 作者='" + author + '\'' +
                ", 价格=" + price +
                ", 类型='" + type + '\'' +
                ", 状态=" + borrow +
                '}';
    }
    /*
    获取、修改书的属性值
     */

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isBorrow() {
        return borrow;
    }

    public void setBorrow(boolean borrow) {
        this.borrow = borrow;
    }
}
